package com.irdstudio.efp.esb.api.service.common.repository;

import com.irdstudio.efp.console.common.ConsoleConstant;
import com.irdstudio.efp.limit.service.facade.LmtPrdContService;
import com.irdstudio.efp.limit.service.vo.LmtPrdContVO;
import com.irdstudio.efp.limit.service.vo.LmtPrdContVOBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 * 需求编号:2019D08--
 * 问题编号:
 * 开发人员: caoxin
 * 创建日期:2019/12/4
 * 功能描述:
 * 修改日期:2019/12/4
 * 修改描述:
 */
@Service("lmtRepository")
public class LmtRepository {
    @Autowired
    @Qualifier("lmtPrdContService")
    private LmtPrdContService lmtPrdContService;

    public LmtPrdContVO getLmtPrdContBySeq(String lmtApplySeq) {
        return lmtPrdContService.queryByPk(LmtPrdContVOBuilder.aLmtPrdContVO().withLmtApplySeq(lmtApplySeq).withLmtStatus(ConsoleConstant.LIMIT_STS_01).build());
    }

    public LmtPrdContVO getActiveLmtPrdCont(String lmtApplySeq) {
        return lmtPrdContService.queryByPk(LmtPrdContVOBuilder.aLmtPrdContVO().withLmtApplySeq(lmtApplySeq).withLmtStatus(ConsoleConstant.LIMIT_STS_02).build());
    }

}
